  function ValidateProduct(){
     var name = document.form_add_product.name.value;
     var quantity = document.form_add_product.quantity.value;
     var description = document.form_add_product.description.value;
     var errorLog=document.getElementById("add_product_error_log");
     
      if ((name== "") || (name.value == "undefined")) {
           errorLog.innerHTML='Insert a name.';
           document.form_add_product.name.focus();
           return false;
        }
        else if ((quantity== "")||(isNaN(quantity)) ||(parseInt(quantity)<=0) ){
           errorLog.innerHTML='Quantity must be more than 0.';
           document.form_add_product.quantity.focus();
           return false;
        }
        else if ((description== "") || (description== "undefined")) {
           errorLog.innerHTML='Insert a description';
           document.form_add_product.description.focus();
           return false;
        }
        //INVIA IL form_register
        else {
           document.form_add_product.submit();
        }
  }
